<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	   
	</head>
	<body>
		<form action="" method="post" enctype="multipart/form-data">
	
		<div class="alert alert-success">添加品牌</div>
		<div class="form-group">
			<label for="exampleInputEmail1">品牌名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" name="brand_name" value="{{$oldData['brand_name']}}">
		</div>
		<script type="text/javascript" src="Public/jquery-1.8.2.min.js"></script>
			<script type="text/javascript">
				$(function(){
					$(".close_img").click(function(){
						//移除图片所在div
						$(".img_div").remove();
						//2.添加一个type=file的input输入框
						$(".file_div").html('<input id="exampleInputEmail1" class="form-control" type="file" name="logo">');
					})
				})
			</script>
		<div class="form-group">
				<label for="exampleInputEmail1">logo</label>
				{{if value="$oldData['brand_logo']"}}
					<div class="img_div">
						<img src="{{$oldData['brand_logo']}}"/>
						<a href="javascript:;" class="close_img">X</a>
						<input type="hidden" name="brand_logo" id="logo" value="{{$oldData['brand_logo']}}" />
					</div>
				{{else}}
				<input id="exampleInputEmail1" class="form-control" type="file" name="brand_logo">
				{{endif}}
				<div class="file_div">
					
				</div>
			</div>
		<div class="form-group">
			<label for="exampleInputEmail1">排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" name="brand_sort" value="{{$oldData['brand_sort']}}">
		</div>
		<input type="hidden" name="brand_id" id="brand_id" value="{{$_GET['brand_id']}}" />
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
